package com.csy.orm_mybatis.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.csy.orm_mybatis.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author csy
 * @since 2022-04-18
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    IPage<User> selectMyPage(Page<User> page,@Param(Constants.WRAPPER) QueryWrapper<User> wrapper);

    User findById(@Param("id") Long id);

    void saveAll(@Param("list") List<User> users);
}
